﻿<uc:BaseKioskControl x:Class="Kiosk.UserControls.EmployeeDirectoryScreen"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:uc="clr-namespace:Kiosk.UserControls"
    Loaded="userControl_Loaded"  Height="400" Width="600" Margin="40"
    >
    <UserControl.Resources>
        <Storyboard x:Key="showEmp"  >
            <DoubleAnimation From="0" To="1" Storyboard.TargetName="empScale" Storyboard.TargetProperty="ScaleY" Duration="0:0:0.25" />
            <DoubleAnimation From="1" To=".2" Storyboard.TargetName="grdSearch" Storyboard.TargetProperty="Opacity" Duration="0:0:0.25" />
        </Storyboard>
        <Storyboard x:Key="hideEmp"  >
            <DoubleAnimation From="1" To="0" Storyboard.TargetName="empScale" Storyboard.TargetProperty="ScaleY" Duration="0:0:0.25" />
            <DoubleAnimation From=".2" To="1" Storyboard.TargetName="grdSearch" Storyboard.TargetProperty="Opacity" Duration="0:0:0.25" />
        </Storyboard>
    </UserControl.Resources>
    <Grid>
        
        <Grid Name="grdSearch">
            <Grid.Background>
                <ImageBrush ImageSource="images/presentationBG.png" Stretch="Fill" />
            </Grid.Background>
            <Grid.RowDefinitions>
            <RowDefinition Height="42*" />
            <RowDefinition Height="101*" />
            <RowDefinition Height="215*" />
            <RowDefinition Height="42*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="30*" />
            <ColumnDefinition Width="534*" />
            <ColumnDefinition Width="33.009*" />
        </Grid.ColumnDefinitions>

        <Grid Grid.Row="1" Grid.Column="1" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width=".5*" />
                    <ColumnDefinition Width="5*"/>
                    <ColumnDefinition Width=".5*"/>
                </Grid.ColumnDefinitions>
                <uc:LetterButton RenderTransformOrigin=".5,.5" Grid.Column="0" Letter="&lt;" x:Name="btnScrollLeft" MouseLeftButtonDown="btnScrollLeft_MouseLeftButtonDown"  >
                <uc:LetterButton.RenderTransform>
                    <ScaleTransform ScaleY="1.5" />
                </uc:LetterButton.RenderTransform>
            </uc:LetterButton>
            <ScrollViewer Grid.Column="1" Name="scrollViewer" CanContentScroll="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
                <StackPanel Name="pnlAlphabet" Orientation="Horizontal" ></StackPanel>
            </ScrollViewer>
            <uc:LetterButton RenderTransformOrigin=".5,.5" Grid.Column="2" Letter="&gt;"  x:Name="btnScrollRight" MouseLeftButtonDown="btnScrollRight_MouseLeftButtonDown"  >
                <uc:LetterButton.RenderTransform>
                    <ScaleTransform ScaleY="1.5" />
                </uc:LetterButton.RenderTransform>
            </uc:LetterButton>
        </Grid>
        
        <ScrollViewer Name="empScroll" HorizontalScrollBarVisibility="Hidden" Grid.Row="2" Grid.Column="1">
            <WrapPanel Name="pnlEmployees" Width="{Binding ElementName=empScroll, Path=ActualWidth}" />
        </ScrollViewer>
    </Grid>
        <Border>
            <Border.RenderTransform>
                <ScaleTransform ScaleX="1" ScaleY="0" x:Name="empScale"></ScaleTransform>
            </Border.RenderTransform>
            <uc:EmployeePresenter x:Name="empPres" Close="empPres_close" />
        </Border>
    </Grid>
</uc:BaseKioskControl>
